$(document).ready(function() {
    $('#defaultForm').bootstrapValidator({
        live: 'disabled',
        message: 'This value is not valid',
        feedbackIcons: {
            valid: 'glyphicon glyphicon-ok',
            invalid: 'glyphicon glyphicon-remove',
            validating: 'glyphicon glyphicon-refresh'
        },
        fields: {
            username: {
                validators: {
                    notEmpty: {
                        message: '姓名不能为空'
                    }
                }
            },
            cellPhone: {
                validators: {
                    notEmpty: {
                        message: '手机号不能为空'
                    }
                }
            },
            emailAddress: {
                validators: {
                    emailAddress: {
                        message: '请输入正确的邮箱格式'
                    }
                }
            }
        }
    });


    $('#alumnus1').selected(function() {
        $('#enterSchool').show("true");
    });
    // Validate the form manually
    $('#validateBtn').click(function() {
        $('#defaultForm').bootstrapValidator('validate');
    });

    $('#resetBtn').click(function() {
        $('#defaultForm').data('bootstrapValidator').resetForm(true);
    });
});
